package cn.edu.scau.cmi.wangmaoren.client.spring;

import cn.edu.scau.cmi.wangmaoren.spring.domain.Student;

//利用反射创建对象
public class ReflectExampleClient
{
	public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException
	{
		Class c = Class.forName("cn.edu.scau.cmi.wangmaoren.spring.domain.Student");
		Student student = (Student) c.newInstance();
		student.setName("梁早清");
		System.out.println(student.getName());
	}
}
